package com.cuixichang.minimalism.domain;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cuixichang.minimalism.core.security.userdetails.CredentialDetail;
import com.cuixichang.minimalism.transfer.dto.ILoginDTO;
import com.cuixichang.minimalism.transfer.po.ILogin;

public interface ILoginCommandService {
  ILoginDTO searchById(Long id,String moduleName, CredentialDetail credentialDetail);
  String rigister(ILoginDTO iLoginDTO, String systemCode);
  ILoginDTO insert(ILoginDTO iLoginDTO, CredentialDetail credentialDetail);
  Page<ILoginDTO> roleHasBindingLogins(ILoginDTO loginDTO, Long pageNo, Long pageSize, Long roleId, CredentialDetail credentialDetail);
  Page<ILoginDTO> roleUnBindingLogins(ILoginDTO loginDTO, Long pageNo, Long pageSize,Long roleId, CredentialDetail credentialDetail);
  boolean updateById(ILoginDTO loginDTO, CredentialDetail credentialDetail);
  boolean deleteById(Long id);
  boolean deleteByIdHasPreCheck(Long id, CredentialDetail credentialDetail);
  Page<ILoginDTO> selectPageByConditional(ILoginDTO loginDTO, Long pageNo, Long pageSize, CredentialDetail credentialDetail);
  boolean allowUseLoginName(String loginName, Long matchLoginId);
  boolean updateCurrentPassword(String oldPassword, String newPassword, CredentialDetail credentialDetail);
  boolean updateSubPassword(Long loginId, String password, CredentialDetail credentialDetail);
}
